<!DOCTYPE html>
<html th:replace="layout/layout"
      xmlns:th="http://www.thymeleaf.org">
<style th:fragment="styles">
</style>
<div th:fragment="content">
    <div class="row wrapper border-bottom white-bg page-heading">
        <div class="col-lg-10">
            <h2>企业子账号管理</h2>
            <ol class="breadcrumb">
                <li>
                    <a href="/index?menuId=1">首页</a>
                </li>
                <li class="active">
                    <strong>子账号管理</strong>
                </li>
            </ol>
        </div>
        <div class="col-lg-2">

        </div>
    </div>
    <div class="wrapper wrapper-content  animated fadeInRight">
        <div class="row">
            <div class="col-lg-12">
                <div class="ibox ">
                    <div class="ibox-content">
                        <div class="row">
                            <div class="col-lg-3">
                                <div class="form-group">
                                    <input type="text" id="search_userName" placeholder="登录名" name="search_userName" autocomplete="off" class="form-control">
                                </div>
                            </div>
                            <div class="col-lg-3">
                                <div class="form-group">
                                    <input type="text" id="search_realName" placeholder="真实姓名" name="search_realName" autocomplete="off" class="form-control">
                                </div>
                            </div>
                            <div class="col-lg-3">
                                <div class="form-group">
                                    <input type="text" id="search_phone" placeholder="联系电话" name="search_phone" autocomplete="off" class="form-control">
                                </div>
                            </div>
                            <div class="col-lg-3">
                                <button type="submit" class="btn btn-primary  btn-rounded  btn-sm" id="search" onclick="doSearch()"><i
                                        class="fa fa-search"></i>&nbsp;搜索</button>
                                <button type="submit" class="btn btn-warning  btn-rounded  btn-sm" id="refresh" onclick="doRest()"><i
                                        class="fa fa-refresh"></i>&nbsp;重置</button>
                            </div>
                        </div>

                        <div class="jqGrid_wrapper">
                            <div class="btn-group-sm" id="toolbar" role="group">
                                <a class="btn btn-success" name="AddNew" id="AddNew" data-toggle="modal" data-target="#myModalAdd" onclick="addRecord();"  >
                                    <i class="fa fa-plus"></i> 新增
                                </a>
                            </div>

                            <table class="table table-striped table-bordered table-hover " id="tableList" >
                            </table>


                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--模态框-->
    <div class="modal inmodal" id="myModalAdd" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog  modal-lg">
            <div class="modal-content animated bounceInRight">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title">子账号信息</h4>
                </div>
                <div class="modal-body">
                    <!--@*模态框body*@-->
                    <div class="tabs-container">

                        <form class="form-horizontal" id="myform">
                            <div class="panel-body form-horizontal">
                                <div class="row" id="nameContainer">
                                    <label class="col-lg-2 control-label"><font color="red">*</font>登录名</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="text" id="text_userName" name="text_userName" placeholder="登录名" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label"><font color="red">*</font>真实姓名</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="text" id="text_realName" name="text_realName" placeholder="真实姓名" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="row" id="passwordContainer">
                                    <label class="col-lg-2 control-label"><font color="red">*</font>登录密码</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="password" id="text_password" name="text_password" placeholder="登录密码" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label"><font color="red">*</font>确认密码</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="password" id="text_passwordConfirm" name="text_passwordConfirm" placeholder="确认密码" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="row" id="phoneContainer">
                                    <label class="col-lg-2 control-label"><font color="red">*</font>联系电话</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="text" id="text_phone" name="text_phone" placeholder="联系电话" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="row" id="preContainer">
                                    <label class="col-lg-2 control-label">权限设置</label>
                                    <div class="col-lg-10">
                                        <div class="form-group">
                                            <div class="row" id="BreedSonMenu">
                                                <div class="col-lg-3">
                                                    <label class="checkbox-inline">
                                                        <input type="checkbox" name="menu"  value="1"> 畜禽进厂
                                                    </label>
                                                </div>
                                                <div class="col-lg-3">
                                                    <label class="checkbox-inline">
                                                        <input type="checkbox" name="menu"    value="2"> 无害化环节
                                                    </label>
                                                </div>
                                                <div class="col-lg-3">
                                                    <label class="checkbox-inline">
                                                        <input type="checkbox" name="menu"    value="3"> 企业信息
                                                    </label>
                                                </div>
                                                <div class="col-lg-3">
                                                    <label class="checkbox-inline">
                                                        <input type="checkbox" name="menu"    value="4"> 畜禽出厂
                                                    </label>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row"  id="statusContainer">
                                    <label class="col-lg-2 control-label">是否启用</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <label class="radio-inline">
                                                <input type="radio"  value="1" name="text_activity" checked> 启用
                                            </label>
                                            <label class="radio-inline">
                                                <input type="radio"  value="0" name="text_activity" > 停用
                                            </label>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>

                    <!--模态框body结束-->
                </div>
                <div class="modal-footer">
                    <button type="button" id="save" name="save" class="btn btn-success" onclick="saveRecord();"><i class="fa fa-save"></i>&nbsp;保存</button>
                    <button type="button" id="close" name="close" class="btn btn-danger" data-dismiss="modal"><i class="fa fa-close"></i>&nbsp;关 闭</button>
                </div>
            </div>
        </div>
    </div>

</div>
<div th:fragment="scriptRef">
    <script th:src="@{/js/lib/inspinia/js/plugins/laydate/laydate.js}"></script>
    <!--表单验证-->
    <script th:src="@{/js/lib/validate/jquery.validate.min.js}"></script>
    <script th:src="@{/static/js/accountmanage/accountmange.js}"></script>
</div>
<script th:fragment="scripts" type="text/javascript">
    var userType = 4;
    AccountMange.init();
    $('input[type="checkbox"]').iCheck({
        handle : 'checkbox',
        checkboxClass: 'icheckbox_square-green',
        radioClass   : 'iradio_square-green'
    });

    $('input[type="radio"]').iCheck({
        handle : 'radio',
        checkboxClass: 'icheckbox_square-green',
        radioClass   : 'iradio_square-green'
    });
</script>
</html>
